use "HSSC replication\HSSC replication data\Public data\US_FILE.dta", replace

/*
gen gov_gop=1 if governor_party=="Republican"
replace gov_gop=0 if governor_party=="Democrat"

gen st_gop=1 if state_legislator=="Republican"
replace st_gop=0 if state_legislator=="Democrat"

foreach x in gov_gop st_gop trump_sh {
egen Z`x'=std(`x')
}

egen gop_index=rowmean(Zgov_gop Zst_gop Ztrump_sh)
*/

label var gop_index "Republican party index"
label var Zstringencyindex "Stringency index (standardized)"
label var Telework "Percent of households with teleworker via US Census"
label var loghhincome  "ln of median household income"
label var logpc_cum_deaths "Log of COVID deaths per capita"
label var gini "Gini coefficient for household income"
 
**********
****Supplementary Table 8****
*******
reg lost_income Zstringencyindex  Telework 
outreg2 using "HSSC replication data\Findings\Model_5_USA_Income_Stringency.xls", excel adjr2 label dec(2) replace
reg lost_income Zstringencyindex Telework loghhincome 
outreg2 using "HSSC replication data\Findings\Model_5_USA_Income_Stringency.xls", excel adjr2 label dec(2) 
reg lost_income Zstringencyindex Telework loghhincome logpc_cum_deaths 
outreg2 using "HSSC replication data\Findings\Model_5_USA_Income_Stringency.xls", excel adjr2 label dec(2) 
reg lost_income Zstringencyindex Telework loghhincome logpc_cum_deaths gini 
outreg2 using "HSSC replication data\Findings\Model_5_USA_Income_Stringency.xls", excel adjr2 label dec(2) 
ivregress 2sls lost_income (Zstringencyindex=gop_index) Telework loghhincome logpc_cum_deaths gini, first
outreg2 using "HSSC replication data\Findings\Model_5_USA_Income_Stringency.xls", excel adjr2 label dec(2) 

